package study.spring.core.ioc._3_bean_assemble.propertyAssemble;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 用于演示 属性注入(field injection)
 * <p>
 * 其他注入方式: 构造器注入, setter 方法注入
 */
@Component
public class InjectWithSetMethodInjection {

  public InjectProperty injectProperty;
  public InjectProperty injectPropertyTwo;

//  @Autowired
  public void setInjectProperty(InjectProperty injectProperty) {
    System.out.println("调用InjectWithSetMethodInjection 的 setInjectProperty 方法");
    this.injectProperty = injectProperty;
  }
}
